﻿@model MVCApp.Models.Congregation

@{
    ViewBag.Title = "Edit congregation";
}

<h2>Edit</h2>

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Congregation</legend>

        @Html.HiddenFor(model => model.Id)

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Country)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.Country, new SelectList(Enum.GetValues(typeof(MVCApp.Enums.Country))))
            @Html.ValidationMessageFor(model => model.Country)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.SharingAddressesEnabled)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.SharingAddressesEnabled)
            @Html.ValidationMessageFor(model => model.SharingAddressesEnabled)
        </div>

        <p>
            <input type="submit" value="@Strings.Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink(Strings.BackToList, "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
